{template 'common/header'}
<div class="main">
    <ul class="nav nav-tabs">
        <li {if $_GPC['do'] == 'votelist'}class="active"{/if}><a href="{php echo $this->createWebUrl('votelist');}">管理</a></li>
        <li {if $_GPC['do'] == 'voteresult'}class="active"{/if}><a href="{php echo $this->createWebUrl('voteresult', array('id' => $vote['id']));}">查看结果</a></li>
        <li {if $_GPC['do'] == 'votelog'}class="active"{/if}><a href="{php echo $this->createWebUrl('votelog', array('id' => $vote['id']));}">查看记录</a></li>
    </ul>
    <div class="search">
        <form action="">
            <table class="table table-bordered tb">
                <tbody>
                <tr class="span6">
                    <th class="span4">投票结果</th>
                </tr>
                </tbody>
            </table>
        </form>
    </div>

    <div style="padding: 0 15px 0  15px;" style="position:relative">
        <table class="table table-hover" style="position:relative">
            <thead class="navbar-inner">
            <tr><th>序号</th>
                <th>选项</th>
                <th>状态</th>
                <th>票数</th>
                <!--<th>操作</th>-->
            </tr>
            </thead>
            <tbody>

            {loop $options $row}
            <tr>
                <td>{$row['id']}</td>
                <td>{$row['title']}</td>
                <td>
                    {if $row['state']}
                    <a id="disable" href="{php echo $this->createWeburl('state', array('tablename' => 'option', 'id' => $row['id'], 'state' => 0))}" onclick="return ajaxopen(this.href);" class="btn btn-danger  module-button-switch">禁止</a>
                    {else}
                    <a id="enable"  href="{php echo $this->createWeburl('state', array('tablename' => 'option', 'id' => $row['id'], 'state' => 1))}" onclick="return ajaxopen(this.href);" class="btn btn-primary module-button-switch">开放</a>
                    {/if}
                </td>
                <td>{$row['total']}</td>
            </tr>
            {/loop}

            </tbody>
        </table>
    </div>

</div>
{template 'common/footer'}